# Maintainer:

_pyname=rfc3986_validator
pkgname=python-${_pyname/_/-}
pkgver=0.1.1
pkgrel=2
pkgdesc='A pure python RFC3986 validator'
url="https://github.com/naimetti/rfc3986-validator"
license=(MIT)
arch=(any)
depends=(python-six)
makedepends=(python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest-runner python-rfc3987 python-hypothesis)
source=(https://pypi.python.org/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz)
sha512sums=('b679e3c1b38d9ecc633d7d9a7179711d5adc50d38a51f28972f668e098058b92ec9f69e947fab7eaa3863377f35c3f13e5fd1ae35da2175a01170f2940360c2f')

build() {
  cd $_pyname-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd $_pyname-$pkgver
  pytest -v
}

package() {
  cd $_pyname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
